﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    <head>
        <style type="text/css">
            body { color: InactiveCaptionText; }
            h2 { font-size: 120%; color: CaptionText; }
        </style>
    </head>
	<body>
	    <h2>Statement Basics</h2>
	    <p>Statements in JavaScript are represented by descendants of the abstract Statement class. They're easily created using the <strong>JS</strong> static class and extension methods.</p>
	    <p>Some examples:</p>
	    <ul>
	        <li>JS.Break()</li>
	        <li>JS.Do().While()</li>
	        <li>JS.If().Then().Else()</li>
	        <li>JS.Try().Catch().Finally()</li>
	    </ul>
        <h2>Source:</h2>
        <style type="text/css">
        .cf { font-family: Courier New; font-size: 10pt; color: black; background: white; }
        .cl { margin: 0px; }
        .cb1 { color: blue; }
        .cb2 { color: #2b91af; }
        .cb3 { color: #a31515; }
        </style>
        <div class="cf">
        <p class="cl"><span class="cb1">var</span> a = <span class="cb2">JS</span>.Id(<span class="cb3">&quot;a&quot;</span>);</p>
        <p class="cl"><span class="cb1">return</span> <span class="cb2">JS</span>.For(<span class="cb2">JS</span>.Var(a.AssignWith(10)), a.IsGreaterThan(0), a.PostDecrement())</p>
        <p class="cl">&nbsp;&nbsp;&nbsp; .Do(<span class="cb2">JS</span>.Alert(a));</p>
        </div>
    </body>
</html>
